package com.game.majiang.vo;

import java.sql.Types;

import com.game.server.db.Parameter;
import com.game.server.db.ParameterType;
import com.game.server.db.SqlHelper;
import com.game.server.db.SqlHelperwrite;

import lombok.Data;

@Data
public class ExchargeVo {

	public static boolean insertExchargeVo(int id,int money,int type,int zuanshi)
	{
		String cmdText = "insert into exchange(userid,money,type,zuanshi)values(?,?,?,?)";
		Parameter p1 = new Parameter(Types.INTEGER, id, ParameterType.Input);
		Parameter p2 = new Parameter(Types.INTEGER, money, ParameterType.Input);
		Parameter p3 = new Parameter(Types.INTEGER, type, ParameterType.Input);
		Parameter p4 = new Parameter(Types.INTEGER, zuanshi, ParameterType.Input);
	   
	   int i= SqlHelperwrite.execute(cmdText,p1,p2,p3,p4);
	   if(i>0){
		   return true;
	   }else{
		   return false;
	   }
	}
	
}
